<?php

namespace zhtfrontend\models\datas;

use Yii;

/**
 * This is the model class for table "{{%goods_group}}".
 *
 * @property integer $id
 * @property integer $goods_id
 * @property integer $group_id
 */
class GoodsGroup extends \zhtfrontend\components\bases\BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%goods_group}}';
    }

    
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['goods_id', 'group_id','discount_type'], 'integer'],
            [['cost_reduce', 'market_price_reduce','price_reduce','price'], 'number']
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('zhtfrontend', '自增编号'),
            'goods_id' => Yii::t('zhtfrontend', '商品id'),
            'group_id' => Yii::t('zhtfrontend', '组合id'),
            'discount_type' => Yii::t('zhtfrontend', '优惠方式（1比例2固定减少）'),
            'cost_reduce' => Yii::t('zhtfrontend', '成本价减少金额（类型为1 整数）'),
            'market_price_reduce' => Yii::t('zhtfrontend', '市场价价减少金额（类型为1 整数）'),
            'price_reduce' => Yii::t('zhtfrontend', '销售价减少金额（类型为1 整数）'),
            'price' => Yii::t('zhtfrontend', '组合完价格'),
        ];
    }
}
